package com.jy.adscm.operation.base.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.jy.adscm.bean.system.JyDept;
import com.jy.adscm.bean.system.JyUser;
import com.jy.adscm.exception.AdscmSystemException;
import com.jy.adscm.operation.base.bean.QueryTaskManager;
import com.jy.adscm.operation.base.bean.TaskManager;
import com.baomidou.mybatisplus.service.IService;
import com.jy.adscm.security.utils.Token;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zyl
 * @since 2018-12-11
 */
public interface TaskManagerService extends IService<TaskManager> {

    Boolean updateTaskManager(TaskManager taskManager, Token token)throws AdscmSystemException;

    List<TaskManager> selectTaskManager(Token token) throws AdscmSystemException;

    List<JyUser> selectTaskPerformPerson(Integer deptId)throws AdscmSystemException;
    List<JyDept> selectDepts();

   Page<TaskManager> selectMyTaskManager(Page<TaskManager> page, QueryTaskManager queryTaskManager, Integer taskState, Token token)throws AdscmSystemException;

    boolean insertEverDay(Token token)throws AdscmSystemException;

    boolean inserttaskManager(TaskManager taskManager) throws AdscmSystemException;

    boolean deleteTaskManager(Integer id, Token token)throws AdscmSystemException;


    Boolean  updateByCreator(Integer id);
    Boolean   updateByPerformer(Integer id);


    boolean creatorSelected(Integer id, Token token);

    boolean performerSelected(Integer id, Token token);

    boolean deleteDBTaskManager(Integer id, Token token)throws AdscmSystemException;

    Page<TaskManager> selectAllTaskManager(QueryTaskManager queryTaskManager, Token token);

    boolean insertWeekTask(Token token)throws AdscmSystemException;

    boolean insertMonthTask(Token token)throws AdscmSystemException;
}
